import java.util.LinkedList;
import java.util.Stack;

/**
 * @program: 1.15 栈和队列
 * @description:
 * @author: 李鑫月
 * @create: 2022-01-15 09:47
 **/
public class  Testdemo {
    public static void main(String[] args) {
        MyStack1 myStack1=new MyStack1();
        myStack1.push(1);

    myStack1.pop();
//        System.out.println(myStack1.empty());
    }
    public static void main4(String[] args) {
    MyQueue1 myQueue1=new MyQueue1();
    myQueue1.push(1);

    myQueue1.push(2);
    int tmp=myQueue1.peek();
        System.out.println(tmp);
        System.out.println(myQueue1.pop());


    }
    public static void main3(String[] args) {
        MyCircularQueue myCircularQueue=new MyCircularQueue(5);
        myCircularQueue.enQueue(2);
        myCircularQueue.enQueue(5);
        myCircularQueue.enQueue(6);
        myCircularQueue.enQueue(8);
        myCircularQueue.deQueue();
        myCircularQueue.deQueue();
        myCircularQueue.enQueue(9);
        myCircularQueue.enQueue(1);
        myCircularQueue.enQueue(71);

        System.out.println(myCircularQueue.Rear());
        System.out.println(myCircularQueue.Front());
    }
    public static void main2(String[] args) {
        MyQueue myQueue=new MyQueue();
        myQueue.offer(1);
        myQueue.offer(2);
        myQueue.offer(3);
        myQueue.offer(4);
        System.out.println(myQueue.peek());
        System.out.println(myQueue.poll());
        System.out.println(myQueue.peek());
    }
    public static void main1(String[] args) {

        MyStack myStack=new MyStack();
        myStack.push(1);
        myStack.push(5);
        myStack.push(4);
        myStack.push(2);
        System.out.println(myStack.pop());
        System.out.println(myStack.pop());
        System.out.println(myStack.pop());
        System.out.println(myStack.pop());
        System.out.println(myStack.pop());

    }
}
